package correct.day9;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String n = in.next();

        int len = n.length();
        int num = (len - 1) / 3;
        // StringBuffer str = new StringBuffer();

        // for(int i = 0; i < len; i++) {
        //     str.append(str.charAt(i));
        // }
        // str.reverse();
        String str = n;

        for(int i = 0; i < num; i++) {
            System.out.println(str);
            str = str.substring(0, len-(i+1)*3) + "," + str.substring(len-(i+1)*3, str.length());
        }
        // 980364535
        // 980364,535   [0,6) , [6,9)
        // 980,364,535  [0,3) , [3,10)

        // 80364535
        // 80364,535   [0,5) [5,8)
        // 80,364,535  [0,2) [2,9)
        System.out.println(str);
    }
}
